############################################################################
##

include ../common/Makefile.common

## Process this file with automake to generate Makefile.in.

if BUILD_WITH_MSVC
noinst_LIBRARIES = viewers.lst
else
noinst_LTLIBRARIES = libSoWinViewers.la
endif

## Remove any linklibraries detected by configure, as they are not
## needed in the submodules -- only in the toplevel libSoWin build.

DEFAULT_INCLUDES = -I$(top_builddir)/src -I$(top_srcdir)/src

LIBS = 

############################################################################
## Autogenerated source files.

BUILT_SOURCES = \
	$(SoGuiAllBuiltFiles)

CLEANFILES = \
	$(SoGui_src_Inventor_Gui_viewers_BuiltMetaFiles)

DISTCLEANFILES = \
	$(SoGui_src_Inventor_Gui_viewers_BuiltFiles) \
	$(SoGui_src_Inventor_Gui_viewers_BuiltMetaFiles)

############################################################################
# libtool setup

libSoWinViewers_la_SOURCES = \
	FullViewer.cpp \
	SoWinFullViewerP.h \
	ExaminerViewer.cpp \
	SoWinExaminerViewerP.h \
	PlaneViewer.cpp \
	SoWinPlaneViewerP.h

nodist_libSoWinViewers_la_SOURCES = \
	$(SoGui_src_Inventor_Gui_viewers_BuiltFiles)
#	$(SoGui_src_Inventor_Gui_viewers_BuiltMetaFiles)

############################################################################
# custom setup

viewers_lst_SOURCES = \
	FullViewer.cpp \
	SoWinFullViewerP.h \
	ExaminerViewer.cpp \
	SoWinExaminerViewerP.h \
	PlaneViewer.cpp \
	SoWinPlaneViewerP.h

nodist_viewers_lst_SOURCES = \
	$(SoGui_src_Inventor_Gui_viewers_BuiltFiles)
#	$(SoGui_src_Inventor_Gui_viewers_BuiltMetaFiles)

viewers.lst: Makefile $(viewers_lst_OBJECTS)
	@echo "Linking viewers.lst..."; \
	rm -f $@; \
	for i in $(viewers_lst_OBJECTS); do echo $$i >>$@; done

############################################################################
# header installation

SoWinViewersincdir = $(includedir)/Inventor/Win/viewers
SoWinViewersinc_HEADERS = \
	../widgets/SoWinBitmapButton.h \
	SoWinViewerResource.h

nodist_SoWinViewersinc_HEADERS = \
	SoWinViewer.h \
	SoWinConstrainedViewer.h \
	SoWinFullViewer.h \
	SoWinExaminerViewer.h \
	SoWinFlyViewer.h \
	SoWinPlaneViewer.h

install-SoWinViewersincHEADERS: $(SoWinViewersinc_HEADERS)
	@$(NORMAL_INSTALL)
	$(mkinstalldirs) $(DESTDIR)$(SoWinViewersincdir)
	@list='$(SoWinViewersinc_HEADERS)'; for p in $$list; do \
	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  src="$$d$$p"; dst="$(DESTDIR)$(SoWinViewersincdir)/$$f"; \
	  if cmp -s "$$src" "$$dst"; then :; else \
	    echo " $(INSTALL_HEADER) $$src $$dst"; \
	    $(INSTALL_HEADER) "$$src" "$$dst"; \
	  fi; \
	done

install-nodist_SoWinViewersincHEADERS: $(nodist_SoWinViewersinc_HEADERS)
	@$(NORMAL_INSTALL)
	$(mkinstalldirs) $(DESTDIR)$(SoWinViewersincdir)
	@list='$(nodist_SoWinViewersinc_HEADERS)'; for p in $$list; do \
	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  src="$$d$$p"; dst="$(DESTDIR)$(SoWinViewersincdir)/$$f"; \
	  if cmp -s "$$src" "$$dst"; then :; else \
	    echo " $(INSTALL_HEADER) $$src $$dst"; \
	    $(INSTALL_HEADER) "$$src" "$$dst"; \
	  fi; \
	done

# EOF ######################################################################
